<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>PhpGrid</title>
<link rel="stylesheet" type="text/css" href="css/main.css" media="screen" />
<link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="css/ie6_or_less.css" />
<![endif]-->
<script type="text/javascript" src="js/common.js"></script>
<script src="codepress/codepress.js" type="text/javascript"></script> 
</head>
<body id="type-c">
<div id="wrap">

	  <?php
  include("include/header.php");
  
  ?>
	
	<div id="content-wrap">
	
		 <?php
  include("include/left.php");
  $file="datagrid/examples/simple_sql.php";
  if(isset($_GET['source'])){
  	if(file_exists("datagrid/examples/".$_GET['source'])){
    	$file="datagrid/examples/".$_GET['source'];
 	}  
  }
  $source=file_get_contents($file);
  $get_source=$_GET['source'];
 
  switch($get_source){
  	case "form_few_columns.php":
	case "form_field_editor.php":
	case "form_field_type.php":
	case "form_validate.php":
	case "simple_form.php":
	case "extends_form.php":
	case "form_attributes.php":
		$get_source.="?datagrid_action=new";
	break;  
  }
  
  ?>
		
	  <div id="content">
		
			<div id="breadcrumb"></div>
			
			<h2>代码:</h2>
	        <table width="585" height="383" border="0">
              <tr>
                <td  valign="top">
				<textarea id="myCpWindow" style="width:950px;height:400px;"    class="codepress php readonly-on"><?php
				echo $source;
				
				?>
				</textarea> 
				
				</td>
              </tr>
              <tr>
                <td><h2><a href="<?="datagrid/examples/".$get_source?>"  target="_blank">运行结果</a></h2></td>
              </tr>
            </table>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
	  </div>
	  <div id="poweredby"> </div>
		
	</div>
	
</div>
</body>
</html>